﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace CheckLift.UI.Controls
{
    /// <summary>
    /// Interaction logic for TextChooserContol.xaml
    /// </summary>
    public partial class TextChooserContol : UserControl
    {
        public event EventHandler OnClick;
        public event KeyDownSpecific KeyDownSpecific;

        public TextChooserContol()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (OnClick != null)
                OnClick(this, e);
        }

        private void myTexBox1_KeyDownSpecific(object sender, EventArgs e)
        {
            if (KeyDownSpecific != null)
                KeyDownSpecific(this, e);
        }

        public static readonly DependencyProperty BodyTextProperty = DependencyProperty.Register("ContentText", typeof(string), typeof(TextChooserContol));

        public string ContentText
        {
            get { return GetValue(BodyTextProperty) as string; }
            set { SetValue(BodyTextProperty, value); }
        }
    }
}
